import request from '@/utils/request';

// 社保卡办理
// 列表接口
export async function socialCardList(params) {
  return request(`/esApi/insCardHdl/pageListInsCardHdl`, {
    method: 'POST',
    body: {
      ...params,
    },
  });
}
// 派单信息接口
export async function socialCardSendInfor(params) {
  return request(`/esApi/insCardHdl/getEmpInfo`, {
    method: 'POST',
    body: {
      ...params,
    },
  });
}
export async function cardAdd(params) {
  return request(`/esApi/insCardHdl/addInsCardHdl`, {
    method: 'POST',
    body: {
      ...params,
    },
  });
}
export async function cardDetail(params) {
  return request(`/esApi/insCardHdl/queryInsCardHdl`, {
    method: 'POST',
    body: {
      ...params,
    },
  });
}
export async function cardUpdateDetail(params) {
  return request(`/esApi/insCardHdl/getInsCardHdl`, {
    method: 'POST',
    body: {
      ...params,
    },
  });
}
export async function cardUpdate(params) {
  return request(`/esApi/insCardHdl/updateInsCardHdl`, {
    method: 'POST',
    body: {
      ...params,
    },
  });
}
export async function cardToDeal(params) {
  return request(`/esApi/insCardHdl/execBeginInsCardHdl`, {
    method: 'POST',
    body: params,
  });
}

export async function cardToDealComplete(params) {
  return request(`/esApi/insCardHdl/execEndInsCardHdl`, {
    method: 'POST',
    body: params,
  });
}

export async function cardCancelToDeal(params) {
  return request(`/esApi/insCardHdl/execCanclInsCardHdl`, {
    method: 'POST',
    body: params,
  });
}

export async function cardGrants(params) {
  return request(`/esApi/insCardHdl/execIssueInsCardHdl`, {
    method: 'POST',
    body: params,
  });
}

export async function cardHdlRemark(params) {
  return request(`/esApi/insSerRemark/queryInsRemarkList`, {
    method: 'POST',
    body: params,
  });
}
export async function cardaddHdlRemark(params) {
  return request(`/esApi/insSerRemark/insertInsRemark`, {
    method: 'POST',
    body: params,
  });
}
export async function cardAddCheck(params) {
  return request(`/esApi/insCardHdl/checkAddInsCardHdl`, {
    method: 'POST',
    body: {
      ...params,
    },
  });
}
// 获取材料
export async function getMatList(params) {
  return request('/esApi/insCardHdl/getMatTemplate', {
    method: 'POST',
    body: params,
  });
}
// 模糊查询员工姓名
export async function getEmpNameList(params) {
  return request('/esApi/insCardHdl/getEmpList', {
    method: 'POST',
    body: params,
  });
}
// 获取批量模版
export async function getTemplate(params) {
  return request(`/esApi/fileServer/downloadTemplate?tempSerType=${params.tempSerType}`);
  // console.log(params);
  // return request(`/esApi/fileServer/downloadTemplate`, {
  //   body: params,
  // });
}
export async function checkCardInfor(params) {
  return request('/esApi/insCardHdl/checkInsCardSendPd', {
    method: 'POST',
    body: params,
  });
}

export async function abUploadFile(params) {
  return request('/esApi/insCardHdl/uploadExcelAdd', {
    method: 'POST',
    body: params,
  });
}

export async function bUploadFile(params) {
  return request('/esApi/rcrdSerHdl/rcrdImport', {
    method: 'POST',
    body: params,
  });
}

export async function ebUploadFile(params) {
  return request('/osApi/insCardHdl/uploadExcelEnd', {
    method: 'POST',
    body: params,
  });
}
